<?php
/**
 * User: YL
 * Date: 2019/09/12
 */

namespace restful\commands;

use Illuminate\Routing\Console\ControllerMakeCommand;
use restful\commands\traits\GeneratorCommandInit;

class MakeController extends ControllerMakeCommand
{
    use GeneratorCommandInit;

    protected function getDefaultNamespace($rootNamespace)
    {
        if ($this->option('module')) {
            return $rootNamespace . '\Http\\' . ucfirst($this->option('module')) . '\Controllers';
        }

        return parent::getDefaultNamespace($rootNamespace);
    }
}
